草庐IT

Running Gradle task ‘assembleDebug‘

全部标签

AttributeError: ‘Arrow3D’ object has no attribute ‘do_3d_projection’ 的修正

AttributeError:‘Arrow3D’objecthasnoattribute‘do_3d_projection’的修正一、错误来源最近在读《程序员数学:用Python学透线性代数和微积分》,其中“第三章上升到三维世界”的主要内容是,把二维向量拓展到三维空间,并用matplotlib来作图示意。大多数的画图功能都能展示,只是在画“三维箭头”图形的时候,系统报错“AttributeError:‘Arrow3D’objecthasnoattribute‘do_3d_projection’”。有人建议,安装matplotlib3.4的版本来规避此问题,据说是3.5版本以后都会出现此问题。但

记Vite打包时出现的报错解决:<script src=“xxx.js“> in “/index.html“ can‘t be bundled without type=“module“ attrib

本篇博客记录解决Vite打包时报错:in"/index.html"can'tbebundledwithouttype="module"attribute或xxx.cssdidn'tresolveatbuildtime,itwillremainunchangelremainunchangedtoberesolvedatruntime当我们通过标签 引入js脚本代码时,出现:can'tbebundledwithouttype="module"attribute,报错大致意思是我们引入js文件时缺少了type='module'属性。 关于标签的属性type=‘module’,如果有疑惑,请看文章:在

ImportError: cannot import name ‘TouchActions‘ from ‘selenium.webdriver‘

今天踩了一个坑:  需要使用selenium-wire抓取请求heads信息,直接用命令pipinstall selenium-wire安装后,调试代码一直报cannotimportname'TouchActions'from'selenium.webdriver'开发环境:selenium 版本4.11.2(用pipshowselenium 查看版本)selenium-wire版本2.5.2 (用pipselenium-wire 查看版本),用pipinstallselenium-wire命令没有指定版本号安装的python 3.7一步一步跟进问题:1、在selenium-wire的webd

解决python报错 UnboundLocalError: local variable ‘labels’ referenced before assignment

python报错:UnboundLocalError错误原因:这个错有部分原因是在使用if--elif--else语句时,丢失了else部分导致的.其他原因可参考其他博主的解决方法.错误复现:defex(a):ifa>0:b=0elifa0:b=1returnbprint(ex(0))UnboundLocalError:localvariable‘b’referencedbeforeassignment解决方法:补上else就好了defex(a):ifa>0:b=0elifa0:b=1else:raiseValueError("parameter'a'cannotbe0!")returnbpr

【python读取nc文件】报错:ValueError: unrecognized engine netcdf4 must be one of: [‘store‘]

写在最前面尝试2019华为杯E题,但是报错:ValueError:unrecognizedenginenetcdf4mustbeoneof:[‘store’]Outputistruncated.Viewasascrollableelementoropeninatexteditor.Adjustcelloutputsettings…最终解决报错1:ValueError:foundthefollowingmatcheswiththeinputfileinxarray’sIObackends:[‘netcdf4’,‘h5netcdf’].Buttheirdependenciesmaynotbeins

git commit使用husky工具格式化时报错“error: cannot spawn .husky/commit-msg: No such file or directory Couldn‘t”

背景使用husky工具对gitcommit信息格式化,配置好commit-msg文件后,使用gitcommit报错‘error:cannotspawn.husky/commit-msg:NosuchfileordirectoryCouldn’tstarthook‘.husky/commit-msg’二、解决办法解决办法是把#!/usr/bin/envsh放到第一行,上边其他信息全部删掉,我这个是之前有文件注释,全部删掉之后就好了现在就可以运行啦三、具体实现:husky+commitlint检查提交描述是否符合规范要求使用gitcz规定gitcommit信息后,感觉还是麻烦,还要选,想着直接gi

解决跨域报错问题&Access to XMLHttpRequest at ‘xxx‘ from origin ‘xxx‘ has been blocked by CORs policy.header

解决跨域报错问题的笔记一、问题描述二、如何解决1.添加@CrossOrigin注解2.添加CorsConfiguration过滤器3.实现WebMvcConfigurer接口,重写addCorsMappings方法一、问题描述我们在完成前后端分离项目时(Vue+SpringBoot),有很多人会遇到跨域问题(CORS)。跨域问题:指的是浏览器不能执行其他网站的脚本。它是由浏览器的同源策略造成的,是浏览器对javascript施加的安全限制。同源策略:是指协议,域名,端口都要相同,其中有一个不同都会产生跨域问题(浏览器产生)。所谓同源是指,域名,协议,端口均相同,例如:http://www.80

解决异步传参时出现 “TypeError: Cannot read properties of undefined (reading‘xxx‘)“这一错误

问题描述异步传参时会出现“TypeError:Cannotreadpropertiesofundefined(reading‘xxx‘)“这一错误例如:Cannotreadpropertiesofundefined(reading‘id’)原因:第一点:异步请求获取数据时,由于数据时异步获取的,所以一开始是没有该数据属性,这种情况下也会报这种错误。比如说data中有一个数据playList:{},,初始值为一个空对象。{{playList.tracks}}是不会报错的,但是,{{playList.tracks.id}}这样就会报错。因为playList.tracks已经是undefined了,

完美解决丨ValueError: time data ‘2018/12/24‘ does not match format ‘%Y/%m/%d‘

这里我选择的是:```pythonfromdatetimeimportdatetimedate=datetime.strptime('2018/12/24','%Y/%m/%d')```如果你可以执行这段代码,那么你可能会收到这样的报错:```pythonTraceback(mostrecentcalllast):File"C:\Users\Administrator\AppData\Local\Programs\Python\Python36\lib\site-packages\IPython\core\interactiveshell.py",line3267,inrun_codeexec

Git 拉取代码提示 unable to access ‘http://xxx.xxx.com/xxx/xxx.git/: Could not resolve host 异常解决

项目场景:在开发过程中,会遇到git拉取提交操作。最近拉取主分支代码的时候,提示拉取失败问题描述提示如下:Updatefailedunabletoaccess'http://xxx.xxx.com/xxx/xxx.git/:Couldnotresolvehostxxx.xxx.com原因分析:出现这个问题,一般是域名对应IP发生变化,git拉取时访问不到造成的。解决方案:两种解决方法:第一种:本地host文件域名对应的IP替换成新的。host文件地址:C:\Windows\System32\drivers\etc第二种:在idea中找到git地址,把域名替换成新IP来解决。Git---> Ma